def spiralOrder(matrix ):
        # write code here
        res = []
        while matrix:
            res += matrix[0]
            print("res: ",res)
            matrix = list(zip(*matrix[1:]))[::-1]
            print("matrix: ",matrix)
            print("\n")
        return res

mm = [[1,2,3],[4,5,6],[7,8,9]]

print(spiralOrder(mm))